<template>
  <div class="shop-cart">

    <!--导航-->
    <nav-bar class="nav-bar">
      <div slot="center">购物车( {{ cartLength }} )</div>
    </nav-bar>

    <cart-list/>
    <cart-bottom-bar/>

  </div>
</template>

<script>

import NavBar from "components/common/navbar/NavBar";
import CartList from "./childComps/CartList";
import CartBottomBar from "./childComps/CartBottomBar";

import {mapGetters} from 'vuex'

export default {
  name: "Shopcart",
  components: {CartBottomBar, CartList, NavBar},
  computed: {
    ...mapGetters(['cartLength'])
  },

}
</script>


<style scoped>
.shop-cart {
  overflow-x: hidden;
}

.nav-bar {
  position: fixed;
  left: 0;
  right: 0;
  background-color: var(--color-tint);
  color: #fff;
  z-index: 999;
}

</style>
